/*
 * Copyright (c) GoKeep by gokeep.org. 2022-2023. All rights reserved
 */
package org.gokeep.common.document;

import org.springframework.data.annotation.Id;
import lombok.Data;
import lombok.experimental.Accessors;
import org.gokeep.common.constant.enums.SexEnum;
import org.gokeep.common.constant.enums.UserStatusEnum;

import java.util.Collections;
import java.util.List;

@Data
@Accessors(chain = true)
public class User {
    @Id
    private String userId;

    /**
     * 开放ID
     */
    private String openId = "";

    /**
     * 用户名
     */
    private String username;

    /**
     * 昵称
     */
    private String nickname = "";

    /**
     * 密码
     */
    private String password;

    /**
     * 手机号
     */
    private String phone = "";

    /**
     * 邮箱
     */
    private String email = "";

    /**
     * 企业ID
     */
    private String companyId;

    /**
     * 性别
     */
    private SexEnum sex = SexEnum.MAN;

    /**
     * 是否要求强制更改密码
     */
    private boolean forceChangePwd = true;

    /**
     * 头像图片key
     */
    private String headIcon;

    /**
     * 用户状态
     */
    private UserStatusEnum status = UserStatusEnum.NORMAL;

    /**
     * 用户扩展信息
     */
    public UserExtend extend = new UserExtend();

    /**
     * 用户关联的组织ID
     */
    private List<String> orgIds = Collections.emptyList();

    /**
     * 用户职位ID列表
     */
    public List<String> jobIds = Collections.emptyList();

    /**
     * 用户环境
     */
    public List<UserSetting> settings = Collections.emptyList();



}